import request from "./request"

/**获取导航属性菜单 */
export function navigationQueryTree() {
	return request({
		url: "/api/admin/BizNavigation/QueryTree" + "?areaType=2",
		data: "get"
	})
}

export function navigationQueryTreeWithType(type) {
	return request({
		url: "/api/admin/BizNavigation/QueryTree" + `?areaType=${type}`,
		data: "get"
	})
}

/**获取导航明细 */
export function navigationDetail(data) {
	return request({
		url: "/api/admin/BizNavigation/Detail",
		method: "get",
		data: data
	})
}

/**更新导航 */
export function navigationUpdate(data) {
	return request({
		url: "/api/admin/BizNavigation/Update",
		method: "post",
		data: data
	})
}

/**创建导航 */
export function navigationCreate(data) {
	return request({
		url: "/api/admin/BizNavigation/Create",
		method: "post",
		data: data
	})
}

/**删除导航 */
export function navigationDelete(id) {
	return request({
		url: "/api/admin/BizNavigation/Delete" + "?" + "id=" + id,
		method: "get"
	})
}

export function ArticleQuery(data) {
	return request({
		url: "/api/admin/Article/Query",
		method: "post",
		data: data
	})
}

export function ArticleDetail(id) {
	return request({
		url: "/api/admin/Article/Detail" + "?id=" + id,
		method: "get"
	})
}

export function ArticleCreateOrUpdate(data) {
	return request({
		url: "/api/admin/Article/CreateOrUpdate",
		method: "post",
		data: data
	})
}

export function ArticleDetale(id) {
	return request({
		url: "/api/admin/Article/Delete?id=" + id,
		method: "get"
	})
}
